<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/styles/regist.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script src="/js/plugins/js-cookie/js.cookie.min.js"></script>
    <script src="/js/vue/md5.js"></script>
    <script type="text/javascript" src="/js/vue/common.js"></script>
    <script type="text/javascript" src="/js/system/regist.js"></script>

</head>
<body>
<script>
    $(function () {

        //测试用的方法
        //2次发送请求,要带上请求头,就不能用传统的get,post方法啦
        //方法一
       /* $.ajax({
            url:domainUrl+"/users/currentUser",
            type:"get",
            data:{},
            //利用请求头带上数据,xhr是异步请求
            beforeSend:function(xhr){
                //调用方法拿到token值
                var token=getToken()
                xhr.setRequestHeader("token",token);
            },
            success:function (data) {
                console.log(data);
            }
        })*/
        //方法2
        ajaxGet("/users/currentUser",{},function (data) {
            console.log(data);
        })

        /*ajaxGet("/currentUser", {}, function (data) {
            console.log(data);
        })*/

       /* ajaxGet("/travel/info", {}, function (data) {
            console.log(data, 1);
        })

        ajaxGet("/travel/userUpdate", {}, function (data) {
            console.log(data, 2);
        })
*/


    })

</script>



</body>
</html>